Skip to content

Conversation

@umamaheswararao
Copy link
Contributor

What changes were proposed in this pull request?

Handled the client side configuration precedence and passing the null to server if no client configs available. Before this patch, client always passing values.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6184

How was this patch tested?

Added test to check the behavior.

Copy link
Contributor

@fapifta fapifta Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't this two condition remained here accidentally? Maybe I miss something, but if I am correct, we do the same in this two ifs as inside the method OzoneClientUtils#validateAndGetClientReplicationConfig(), which we call from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I already moved these checks inside OzoneClientUtils.validateAndGetClientReplicationConfig.
There are just redundant here and removed them now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we open the key we have created by executing the shell command to run putkey earlier instead of creating it? (Also that would mean we get an OzoneInputStream here and we can check its type.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I supposed to reopen key and check type. I did that correction now. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can use asserEquals here on the class instances

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this assert to check types now on KeyDetails.

Copy link
Contributor Author

@umamaheswararao umamaheswararao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fapifta for the review. I have addressed you comments and pushed another commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I already moved these checks inside OzoneClientUtils.validateAndGetClientReplicationConfig.
There are just redundant here and removed them now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I supposed to reopen key and check type. I did that correction now. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this assert to check types now on KeyDetails.

Copy link
Contributor

@fapifta fapifta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @umamaheswararao for the adjustment. +1 after CI

Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks for adding the unit tests. Its just good to have them incase someone changes something by mistake in the future.

@sodonnel sodonnel merged commit 6b5c01c into apache:HDDS-3816-ec Jan 28, 2022
@umamaheswararao
Copy link
Contributor Author

I agree. Thanks @sodonnel and @fapifta for the reviews !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants